.class public Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;
.super Ljava/lang/Object;
.source "ModeSelectDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog$ModeItemsAdapter;
    }
.end annotation


# static fields
.field private static dialog:Landroidx/appcompat/app/AlertDialog;


# direct methods
.method static synthetic access$000()Landroidx/appcompat/app/AlertDialog;
    .locals 1

    .line 37
    sget-object v0, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->dialog:Landroidx/appcompat/app/AlertDialog;

    return-object v0
.end method

.method public static show(Landroid/content/Context;I)V
    .locals 8

    .line 44
    new-instance v0, Landroidx/appcompat/app/AlertDialog$Builder;

    invoke-direct {v0, p0}, Landroidx/appcompat/app/AlertDialog$Builder;-><init>(Landroid/content/Context;)V

    const v1, 0x7f11005e

    .line 45
    invoke-virtual {p0, v1}, Landroid/content/Context;->getString(I)Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertDialog$Builder;->setTitle(Ljava/lang/CharSequence;)Landroidx/appcompat/app/AlertDialog$Builder;

    .line 47
    invoke-static {p0}, Landroid/view/LayoutInflater;->from(Landroid/content/Context;)Landroid/view/LayoutInflater;

    move-result-object v1

    const v2, 0x7f0c004f

    const/4 v3, 0x0

    .line 48
    invoke-virtual {v1, v2, v3}, Landroid/view/LayoutInflater;->inflate(ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object v1

    const v2, 0x7f09015b

    .line 49
    invoke-virtual {v1, v2}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/ListView;

    .line 51
    new-instance v3, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;

    invoke-direct {v3, p0}, Llt/noframe/gpsfarmguide/analytics/FireAnalytics;-><init>(Landroid/content/Context;)V

    .line 52
    new-instance v4, Ljava/util/ArrayList;

    invoke-direct {v4}, Ljava/util/ArrayList;-><init>()V

    .line 53
    new-instance v5, Llt/noframe/gpsfarmguide/models/ModeItemModel;

    const/4 v6, 0x1

    invoke-direct {v5, v6}, Llt/noframe/gpsfarmguide/models/ModeItemModel;-><init>(I)V

    invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 54
    new-instance v5, Llt/noframe/gpsfarmguide/models/ModeItemModel;

    const/4 v7, 0x2

    invoke-direct {v5, v7}, Llt/noframe/gpsfarmguide/models/ModeItemModel;-><init>(I)V

    invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 55
    new-instance v5, Llt/noframe/gpsfarmguide/models/ModeItemModel;

    const/4 v7, 0x5

    invoke-direct {v5, v7, v6}, Llt/noframe/gpsfarmguide/models/ModeItemModel;-><init>(IZ)V

    invoke-interface {v4, v5}, Ljava/util/List;->add(Ljava/lang/Object;)Z

    .line 57
    new-instance v5, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog$ModeItemsAdapter;

    const v7, 0x7f0c0071

    invoke-direct {v5, p0, v7, v4}, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog$ModeItemsAdapter;-><init>(Landroid/content/Context;ILjava/util/List;)V

    invoke-virtual {v2, v5}, Landroid/widget/ListView;->setAdapter(Landroid/widget/ListAdapter;)V

    .line 58
    new-instance v4, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog$1;

    invoke-direct {v4, p0, v3, p1}, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog$1;-><init>(Landroid/content/Context;Llt/noframe/gpsfarmguide/analytics/FireAnalytics;I)V

    invoke-virtual {v2, v4}, Landroid/widget/ListView;->setOnItemClickListener(Landroid/widget/AdapterView$OnItemClickListener;)V

    .line 107
    invoke-virtual {v0, v1}, Landroidx/appcompat/app/AlertDialog$Builder;->setView(Landroid/view/View;)Landroidx/appcompat/app/AlertDialog$Builder;

    .line 109
    invoke-virtual {v0}, Landroidx/appcompat/app/AlertDialog$Builder;->create()Landroidx/appcompat/app/AlertDialog;

    move-result-object p1

    sput-object p1, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->dialog:Landroidx/appcompat/app/AlertDialog;

    .line 113
    sget-object p1, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->dialog:Landroidx/appcompat/app/AlertDialog;

    invoke-virtual {p1, v6}, Landroid/app/Dialog;->setCancelable(Z)V

    .line 114
    check-cast p0, Llt/noframe/gpsfarmguide/views/ActivityDrawer;

    invoke-virtual {p0}, Landroid/app/Activity;->isFinishing()Z

    move-result p0

    if-nez p0, :cond_0

    .line 115
    sget-object p0, Llt/noframe/gpsfarmguide/dialogs/ModeSelectDialog;->dialog:Landroidx/appcompat/app/AlertDialog;

    invoke-virtual {p0}, Landroid/app/Dialog;->show()V

    .line 116
    invoke-static {}, Llt/noframe/gpsfarmguide/App;->getContext()Landroid/content/Context;

    move-result-object p0

    const-string p1, "new_area_dialog_opened"

    invoke-static {p1, p0}, Llt/noframe/gpsfarmguide/App;->stateChanged(Ljava/lang/String;Landroid/content/Context;)V

    :cond_0
    return-void
.end method
